package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2021/11/22 15:03
 */
@RequestMapping("user")
@Controller     //("user") 👉 这个是组件id，不要搞混淆了
public class UserController {

    @ResponseBody
    //@RequestMapping("user/register")
    @RequestMapping("register") //👉 user/register
    public String register() {
        return "user register";
    }
    @ResponseBody
    //@RequestMapping("user/login")
    @RequestMapping("login") //👉 user/login
    public String login() {
        return "user login";
    }
    @ResponseBody
    //@RequestMapping("user/logout")
    @RequestMapping("logout") // 👉 user/login
    public String logout() {
        return "user logout";
    }

    //@RequestMapping("user/list")
    //@RequestMapping("user/modify")
}
